import request from '@/utils/request'

/*
* 收益转换封禁列表
* */
export function swapBlock(user_code, page) {
  return request({
    url: '/swap/block',
    params: {
      user_code,
      page,
      per_page: 15
    }
  })
}

/*
* 收益转换封禁添加用户
* */
export function toSwapBlock(user_code) {
  return request({
    url: '/swap/block',
    method: 'post',
    data: { user_code }
  })
}

/*
* 收益转换删除
* */
export function delSwapBlock(id) {
  return request({
    url: `/swap/block/${id}`,
    method: 'delete'
  })
}

/*
* 封禁提现列表
* */
export function withDrawBlock(user_code, page) {
  return request({
    url: '/withdraw/block',
    params: {
      user_code,
      page,
      per_page: 15
    }
  })
}

/*
* 收益转换封禁添加用户
* */
export function toWithDrawBlock(user_code) {
  return request({
    url: '/withdraw/block',
    method: 'post',
    data: { user_code }
  })
}

/*
* 收益转换删除
* */
export function delWithDrawBlock(id) {
  return request({
    url: `/withdraw/block/${id}`,
    method: 'delete'
  })
}
